package org.auf.controllers;

import org.auf.core.Controller;

public class StaticController extends Controller {

	private static final String RESOURCE_PARAM = "res"; 
	
	@Override
	public void show() {
		
		String res = (String) request.getParameter(RESOURCE_PARAM);
		
		if (res == null) {
			view.load("error");
			view.assignVar("error", "No se ha solicitado ninguna pagina estatica para mostrar");
			view.show();
			return;
		}
		
		view.load(res);
		view.show();
	}

}
